package com.example.shardingdemo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.shardingdemo.entity.UserDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 基础账户表 Mapper 接口
 * </p>
 *
 * @author westboy
 * @date 2019-05-23
 */
public interface SysUserMapper extends BaseMapper<UserDO> {

    <E extends IPage<UserDO>> E selectUserPage(E page,
                                               @Param("deptIds") List<Integer> deptIds,
                                               @Param("username") String username,
                                               @Param("userType") Integer userType,
                                               @Param("status") Integer status);


    <E extends IPage<UserDO>> E selectUserPageByDeptCode(E page,
                                               @Param("deptCodes") List<String> deptCodes,
                                               @Param("username") String username,
                                               @Param("realName") String realName,
                                               @Param("userType") Integer userType,
                                               @Param("status") Integer status);

}